package com.neusoft.neuiotms.dcom.model.change;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "neuiot_change_ci_property")
@org.hibernate.annotations.Table(appliesTo = "neuiot_change_ci_property", comment = "变更配置项属性表")
public class ChangeCiProperty extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    @Length(max = 255, message = "属性id不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '属性ID'")
    private String propertyId;

    @Length(max = 255, message = "属性名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '属性名称'")
    private String propertyName;

    @Length(max = 255, message = "变更前内容不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) DEFAULT NULL COMMENT '变更前内容'")
    private String beforeChange;

    @Length(max = 255, message = "变更后内容不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) DEFAULT NULL COMMENT '变更后内容'")
    private String afterChange;

    @Length(max = 255, message = "工作流TaskId不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) DEFAULT NULL COMMENT '工作流TaskId'")
    private String taskId;

    @ManyToOne(targetEntity = ChangeImplementation.class)
    private ChangeImplementation changeImplementation;

}
